﻿<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="/styles/forms.css">
</head>
<body>
<%- include('includes/header') %>
<main>
    <h1>Edit a post</h1>
    <form action="/posts/<%= post.id %>/edit" method="POST">
        <div class="form-control">
            <label for="title">Title</label>
            <input type="text" name="title" value="<%= post.title %>" id="title" required>
        </div>
        <div class="form-control">
            <label for="summary">Summary</label>
            <input type="text" name="summary" id="summary" value="<%= post.summary %>" required maxlength="255">
        </div>
        <div class="form-control">
            <label for="content">Post Content</label>
            <textarea name="content" id="content" required rows="3">
                <%= post.body %>
            </textarea>
        </div>
        <button class="btn">Edit Post</button>
    </form>
</main>
</body>
</html>